import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {
    public static void main(String[] args) {

        List<String> deck=new ArrayList<>();

        String[] color = {"草花", "方片", "红桃", "黑桃"};

        String[] number = {"K", "Q", "J", "10", "9", "8", "7", "6", "5", "4", "3","2","A"};

        int n=0;
        for (String s : color) {
            for (String string : number) {
                deck.add(s + string);
                n++;
            }
        }

        deck.add("大王");
        deck.add("小王");

        Collections.shuffle(deck);

        for(int i=0;i<3;i++)
        {
            System.out.println("第" + (i+1) +"个人:");
            for (int j=i*(n/3);j<(i+1)*(n/3);j++) {
                System.out.print(deck.get(j));
                System.out.print(" ");
            }
            System.out.println();
        }
    }
}